Add format checking to printf-type APIs #8601
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Toolchains are capable of performing format-checking on user-defined
printf
variants. Add the necessary directives to do this for some commonly-used mbed OS APIs:error
mbed_error_printf
debug
,debug_if
Stream::printf
,Stream::scanf
,RawSerial::printf
Some clean-ups of warnings generated by this change.
SDBlockDevice
changes are most wide-ranging - it's using 64-bit arithmetic excessively due tobd_size_t
being used for all sorts of things that must be much smaller (being limited tosize_t
by being in-memory, or just block sizes).Pull request type